//最早之前是java里面，不能直接new，不能直接实例化 
/**
 * window 就是 不念旧恶单例模式 ， 
 *  */
 class  Window {
     constructor(name){
         this.name = name;
     }
     static getIns(){
         if(!this.getIns){
            this.getIns = !this.getIns
         }
         return this.getIns;
     }
 }
 let w1 = Window.getIns();
 let w2 = Window.getIns();
 console.log(w1=== w2);